package com.liezh.state;

/**
 * @author liezh
 * @date 2021-10-29
 */
public class WaitForPickUpState implements PackageState {
    //Singleton
    private static WaitForPickUpState instance = new WaitForPickUpState();
    private WaitForPickUpState() {}
    public static WaitForPickUpState instance() {
        return instance;
    }
    //Business logic and state transition
    @Override
    public void updateState(PackageContext ctx) {
        System.out.println("5 - Package is waiting for pick up !!");
        ctx.setCurrentState(ReceivedState.instance());
    }
}
